#include <iostream>
using namespace std;

int main()
{
	int i=1,sum=0,n;
	cin>>n;
	while (sum<n)
    {
    	sum=sum+i;	
    	i=i+1;
	}
    cout<<i-1;
}
